<div class="modal-header">
  <button type="button" class="close" ng-click="$dismiss()">
    <span aria-hidden="true">&times;</span>
    <span class="sr-only">Close</span>
  </button>
  <h3 class="modal-title">Recursive Directory Refresh</h3>
</div>
<div class="modal-body">
  <grr-form-proto value="controller.refreshOperation"
                  visible-fields="['max_depth']">
  </grr-form-proto>

  <div class="aler alert-success padded" role="alert"
       ng-if="controller.done && !controller.error">
    Refresh started successfully!
  </div>

  <div class="aler alert-danger padded" role="alert"
       ng-if="controller.done && controller.error">
    {$ controller.error $}
  </div>
</div>
<div class="modal-footer">
  <button ng-if="!controller.done"
          class="btn btn-default" ng-click="$dismiss()" name="Cancel">
    Cancel
  </button>
  <button ng-if="controller.done"
          class="btn btn-default" ng-click="$dismiss()" name="Close">
    Close
  </button>
  <button class="btn btn-primary" ng-if="!controller.requestSent"
          ng-click="controller.createRefreshOperation()"
          name="Proceed">
    Refresh
  </button>
</div>
